import random

from django.http import HttpRequest, HttpResponse
from django.shortcuts import render


# Create your views here.
def show_index(request: HttpRequest):
    fruits = [
        '苹果', '香蕉', '葡萄', '桔子', '甘蔗', '草莓', '西瓜', '蓝莓',
    ]
    selected_fruits = random.sample(fruits,4)
    return render(request, 'index.html',{'fruits':selected_fruits})
